import random


def generate_lottery_numbers(num_sets):
    lottery_numbers = []
    for _ in range(num_sets):
        red_balls = random.sample(range(1, 34), 6)
        blue_ball = random.randint(1, 16)
        lottery_numbers.append(sorted(red_balls) + [blue_ball])
    return lottery_numbers


# 生成5组双色球号码
numbers = generate_lottery_numbers(5)
for i, number_set in enumerate(numbers, start=1):
    print(f"第{i}组: {number_set}")

    if __name__ == "__main__":
        generate_lottery_numbers()
